package com.uubx.service;

import com.uubx.pojo.Department;
import com.uubx.pojo.User;

import java.util.List;

/**
 * @Author wuguojun
 * @Date 2020/12/26 18:52
 * @Version 1.0
 */
public interface DepartmentService {

    //部门的分页查询
    public List<Department> queryAllDepartment(Integer startIndex, Integer limit);

    //部门的总数
    public Long queryAllDepartmentCount();

    //通过部门名称查询
    public List<Department> queryDepartmentByName(String name);

    //通过部门名字查询部门 返回总数
    public Long queryDepartmentNameToCount(String name);

    //通过启用状态查询
    public List<Department> queryDepartmentByStatus(Integer status);

    //通过启用状态查询 返回总数
    public Long queryDepartmentByStatusToCount(Integer status);

    //通过部门id查询该部门下所有员工
    public List<User> queryAllUsersByDepartmentId(Integer departmentId);

    //通过部门id查询该部门下所有员工 count
    public Long queryAllUsersByDepartmentIdToCount(Integer departmentId);

    //停用的修改
    public void updateDepartmentById(Department department);

    //通过id查询部门
    public Department queryDepartmentById(Integer id);


    //删除部门
    public void deleteDepartmentById(Integer id);


    //查询所有的部门名称
    public List<String> queryAllDepartmentName();

    //添加部门
    public void addDepartment(Department department);

}
